home *** CD-ROM | disk | FTP | other *** search
- Most of Shell I have used can perform esoteric operation but grabs too much1111
- memory space to be very useful. The last one that I have used was a 30K
- program. This seem no excessive but the drawback is when loaded in memory it
- freeze near to 100K.
-
- The ABZ Shell is only 5578 bytes long, since it is written entirely in
- assembler. When loaded in memory it uses just a bit more than 6K. Naturally,
- from its compactness, it cannot include many complex commands. In particular
- the input/output redirection is not supported. (The only time I have used
- redirection is to read or print a listing, so I have included 2 commands,
- SHOW and PRINT in replacement. They are similar to the Desktop dialog box
- that appears when you click a non-program file).
-
- The Shell uses 17 commands, including 2 conditional one, which can be easily
- expanded since the source code is also provided. To add a new command, fill
- the keyword list with the name of the command and fill the table of the
- command routine address with the address (label) of the new command routine.
- The keyword list can be found at 'key_w:' in the DATA section and the
- address table at 'call:' in the same section.
-
-
- You will find below all details about the use and particulars of the Shell.
- It is to try when reading the document.
-
- If you have any comment you can contact me via CompuServe [72467,2770], or
- writet to:
-
- Alain Birtz
- 650 Grand St-Charles, St-Paul d'Abbotsford, P.Q., Canada, J0H-1W0
-
-
- You must be patient with my English, I am just learniong it, but I speak
- perfectly French...
- Bye
-
-
- --------------- Upper/Lower case typing and default pathname
-
- When typing something in the Shell you must not be worried about using lower
- or upper case letter. The Shell makes all commmands and arguments upper case
- only before dealing with them. To make the job easier, the shell also
- maintains the concept of pathname (folder) by default. The command PATH sets
- the current pathname and then other commands can work with the file in this
- folder without the use of the complete filename. For example, if the current
- pathname has been set to B:\SOURCE\ASM\ by the command 'PATH B:\SOURCE\ASM\'
- then to copy the file FILE1 from the drive A, you must just type 'COPY
- A:FILE'. The Shell knows the file must be copied to B:\SOURCE\ASM\.
-
-
-
- --------------- The Shell Prompt
-
- MS-DOS or PC-DOS operating systems use Shell prompt to tell the user that the
- computer is waiting for a command. Usuals prompt are something like A: or B>
- The letter before the symbol ':' or '>' is the drive currently active. Our
- Shell gives a bit more information by displaying the complete drive/pathname.
- Morever, the display is made in reverse video to be more readable. A blank
- space in included before the prompt and the cursor blinking position.
-
-
-
- --------------- The four types of commands
-
-
- The first one changes the default disk. By example A: or B:. The Shell change
- the the default pathname according to the argument (A:\ or B:\). You can do
- the same thing by the command PATH.
-
-
- The second type is the keyword. With such a keyword you can, by example, copy
- or delete one or more files. The list of keyword in presentented below.
-
- The third type is the programs files.
-
- Such files have extensions .PRG, .TOS, .TTP and in some case .IMG. The Shell
- starts the execution of the program by just typing the name of the program
- file (with or without the extentions) and some optional arguments. After the
- execution the control is returned to the Shell. By example EDIT FILE1 start
- the program EDIT.TTP and sent FILE1 as argument. WARNING: the TOS cannot
- execute GEM program from within an other program, so don't use any GEM
- program with the Shell.
-
- The fourth type is the BAT file. This kind of file can greatly improve your
- work by doing repetitive task. This is a way to extend the list of keywords.
- The name BAT comes from the extension filename of these kind of files, know
- as BATCH file, like in BOOT.BAT. A BAT file is built with the three previous
- types of commands. Each line of a BAT file holds one keyword (and only one,
- except for IF_EXIST and IF_NOT_EXIST keyword) followed or not by arguments.
- These arguments can be given explicitly or by a variable. The Shell
- recognizes five varaibles: %1, %2, %3, %4, %5.
-
- A BAT file is called in the same way as a program file. You type the
- filename of the BAT file (with or without .BAT extension) followed by the
- arguments (like in a .TTP program). The arguments must be separated by one
- or more blank spaces (character ascII 9 or 32). The Shell puts the first
- argument in the variable %1, the second in %2 and so on. When the BAT
- file is called, the Shell replaces every throughout in the file the variable
- %1, %2,... by their argument and then executes the command of each line,
- one by one. After the last one, the prompt is redisplayed and the Shell
- waits for a new user command.
-
- WARNING: don't call a BAT file within a BAT file. Only the first three
- types of command are recognixed in a BAT file.
-
- As example, you find below the BAT file I have used to assemble and link
- the Shell (with AS68.PRG and ALN.PRG in the Atari developper pak).
-
- if_exist %1 stop
- if_exist %1.prg del %1.prg
- if_exist %1.tos del %1.tos
- if_not_exist %1.s stop
- as68 -N %1.s
- aln -o %1.tos %1
- del %1.o
-
-
-
- --------------- The BOOT.BAT file
-
- The Shell can be activated at the startup by copying the ABZSHELL.TOS file
- in the the AUTO folder (must be renamed ABZSHELL.PRG). When the Shell is
- running for the first time, it check to see if there is if a file named
- in BOOT.BATthe startup drive and if there is, it loads and executes this BAT
- file. I use such a file to put in my ramdisk all the tools I need to write
- my software. So I have put in the AUTO the Shell file ABZSHELL.TOS and the
- boot drive C the BAT file BOOT.BAT. This one holds just the two following
- lines:
-
- if_not_exist e:ABZSHELL.TOS copy c:C_TO_D\*.* e:
- e:
-
- The first line checks if the Shell (ABZSHELL.TOS) is present in the ramdisk E.
- At the startup it is not the case. So there will be an execution of the
- second command in the line, that is, the copying of all files in the folder
- C_TO_E to the ramdisk E. This folder hold my developpement tools. The ramdisk
- I use is resistant to a Reset. After a Reset I don't need to copy my
- developpement tools since thet are already in the ramdisk. This time the
- first line checks for the file ABZSHELL.TOS (copied from the C_TO_D folder)
- and since the file is found go directly to the second line. This one only
- sets the current drive as E:, the ramdisk, and I ready to take back my work.
-
-
- --------------- The keywords and their uses
-
-
-
- --> Dir:
-
- Shows the directory of all files and folder in the disk and/or pathname
- given in argument. If no argument is provided the directory of the current
- default drive and/or pathname is shown. The date and time of file creation
- and the size of the file are also given.
-
- Example: CAT B: or Cat B:\SOURCE\
-
-
-
- --> Copy:
-
- File copy. Take one or two arguments. If only one is provided then the
- argument is the file to be copied. In this case the file is copied to the
- current default folder. The second argument, if it exists, is the name of the
- copied file. You can use the wildcard symbol '?' and '*'. The first matches
- any single character and the second matches any string. If a wildcard symbol
- is used the second argument must be the destination disk and/or pathname.
- The list of all file copied are show to the screen.
-
- Example: Copy FILE1 or Copy FILE1 FILE2 or Copy FILE?.* B:\SOURCE\
-
-
-
- --> Del:
-
- Erases the file given in argument. As for the Copy command you can use
- wildcard symbol. At each file the user must give a warrant to delete. In
- fact four choices are given: Yes, No, All, Cancel. With 'Y' or 'N' the Shell
- erases or not the file and goes to the next file. With 'A' all files are
- automatically deleted and with 'C' the file is not deleted and the Shell
- exit the DEL command. These choices are not offered if the DEL command is used
- within a BAT file.
-
- Example: Del FILE1 ou Del B:\SOURCE\FILE?.*
-
-
-
- --> Rename:
-
- This command requests two arguments. The first is the name of file to be
- renamed and the second is the new filename. Wildcard symbols are prohibed.
-
- Example: Rename B:FILE1 B:FILE2
-
-
-
- --> Path:
-
- Set the disk and/or pathname by default. The disk and/or pathname is the
- argument of the command.
-
- Example: Path B:\SOURCE\
-
-
-
- --> Dfree:
-
- Shows the available space (in bytes) on the disk given in argument. If no
- argument is given the information is given for the current default disk.
-
- Example: Dfree ou Dfree B: ou Dfree B:\SOURCE\
-
-
-
- --> Mfree:
-
-
- Show the free RAM space (in bytes). No argument needed.
-
- Example: Mfree
-
-
-
- --> Show:
- --> Print:
-
- These two commands are similar to the 'SHOW or PRINT' found in the dialog
- box displayed when you click a file in a desktop directory. Both request
- a filename as argument. The first command shows the file to the screen
- while the second send the file to the printer. If the file is a text then
- the TAB (character ascII 9) is expanded to the 8 characters.
- The SHOW command displays the file continuously to the screen. You can
- freeze the screen by hitting any key other than 'Q', 'q' or UNDO (these
- keys stop the display and exit the SHOW command), and restart the display
- by hitting the same key.
- The Print command can be interrupt by hitting any key.
-
- Example: Show FILE1 or Print B:\SOURCE\FILE2
-
-
-
- --> Cls:
-
- Clear the screen and re-display the prompt at the left upper screen corner.
- No argument needed.
-
- Example: Cls
-
-
-
-
- --> Quit:
-
- Exit the Shell and return to the Desktop or to the parent program.
- No argument needed. Must be not used in a BAT file.
-
- Example: Quit
-
-
- --> ?:
-
- Show the list of all commands used by the Shell. No argument needed.
-
- Example: ?
-
-
- The follwing command must be used only within a BAT file.
-
-
-
- --> Stop:
-
- Stop the execution of the BAT file. No argument needed.
-
- Example: Stop
-
-
-
- --> Wait:
-
- The execution of the BAT file is suspended. The Shell waits for a user
- keyboard input. If the touched key is 'Q', 'q' or UNDO then the Shell exits
- the BAT file as for a STOP command, otherwise the Shell resumes the
- execution of BAT file. No argument needed.
-
- Example: Wait
-
-
-
- --> Write:
-
- Display to the screen all text sitting at right of this command.
- This is the only command where argument can hold blank space.
-
- Example: Write BLA BLA BLA
-
-
-
- --> If_exist:
- --> If_not_exist:
-
- In a BAT file these commands need at least two arguments.The first one
- is a filename, the next must be a normal command line. This command line
- will be executed only if the file exists, for IF_EXIST. In contrast the
- command line will be executed only if the file does not exist, for
- IF_NOT_EXIST.
-
- Example: If_exist FILE1 Del FILE1 or If_not_exist FILE1 Stop
-
-
-
- --------------- Shell command sommary
-
- MFREE Free (RAM) memory space
- DFREE Available space on disk
- QUIT Quit The Shell
- DIR File directory
- COPY File copy
- DEL File delete
- REN Rename file
- PATH Set current default disk and/or pathname
- STOP Stop the execution od the BAT file
- WRITE Write message to the scrren
- SHOW Dsiplay the file to the screen
- PRINT Send the file to the printer
- WAIT Pause in a BAT file
- IF_EXIST Execute only if file exist
- IF_NOT_EXIST Execute only if file not exist
- CLS Clear screen
- ? Show the list of all Shell command
-